package com.bawei.fuxi_service;

import android.app.Service;
import android.content.Intent;
import android.os.Binder;
import android.os.IBinder;
import android.widget.Toast;

public class TwoService extends Service {
    public TwoService() {
    }
    //2：返回代理对象
    @Override
    public IBinder onBind(Intent intent) {
        return new TwoBinder();
    }
    //1:定义代理类
    class TwoBinder extends Binder {

        public void  playMusic(){
            Toast.makeText(TwoService.this,"在服务中播放音乐",Toast.LENGTH_LONG).show();
        }
    }
}